package org.zcl.异常;

/**
 * @PROJECT_NAME:
 * @DESCRIPTION: try块中抛出异常，try、catch和finally中都有return语句，返回值是finally中的return
 * @USER: ZhuChengLin
 * @DATE: 2021/11/23 17:29
 */
public class Demo {

    public static void main(String[] args) {
        int num = 10;
        System.out.println(test(num));
    }

    public static int test(int b) {
        try {
            b += 10;
            return b;
        } catch (Exception ignored) {
        } finally {
            b += 10;
            return b;
        }
    }
}